package cn.kai.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName ums_public_course_teach
 */
@TableName(value ="ums_public_course_teach")
@Data
public class UmsPublicCourseTeach implements Serializable {
    /**
     * 选修课上课自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer publicCourseTeachId;

    /**
     * 选修课编号
     */
    private String publicCourseTeachNo;

    /**
     * 选修课专业编号（若有则为本专业选修课若无则为公共选修课）
     */
    private String publicCourseTeachSpecialNo;

    /**
     * 教师编号
     */
    private String publicCourseTeacherNo;

    /**
     * 上课的教室
     */
    private String publicCourseTeachClassRoom;

    /**
     * 0-7表示周一到周日
     */
    private Integer publicCourseTeachDay;

    /**
     * 上课时间(13:00-14:40)
     */
    private String publicCourseTeachTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UmsPublicCourseTeach other = (UmsPublicCourseTeach) that;
        return (this.getPublicCourseTeachId() == null ? other.getPublicCourseTeachId() == null : this.getPublicCourseTeachId().equals(other.getPublicCourseTeachId()))
            && (this.getPublicCourseTeachNo() == null ? other.getPublicCourseTeachNo() == null : this.getPublicCourseTeachNo().equals(other.getPublicCourseTeachNo()))
            && (this.getPublicCourseTeachSpecialNo() == null ? other.getPublicCourseTeachSpecialNo() == null : this.getPublicCourseTeachSpecialNo().equals(other.getPublicCourseTeachSpecialNo()))
            && (this.getPublicCourseTeacherNo() == null ? other.getPublicCourseTeacherNo() == null : this.getPublicCourseTeacherNo().equals(other.getPublicCourseTeacherNo()))
            && (this.getPublicCourseTeachClassRoom() == null ? other.getPublicCourseTeachClassRoom() == null : this.getPublicCourseTeachClassRoom().equals(other.getPublicCourseTeachClassRoom()))
            && (this.getPublicCourseTeachDay() == null ? other.getPublicCourseTeachDay() == null : this.getPublicCourseTeachDay().equals(other.getPublicCourseTeachDay()))
            && (this.getPublicCourseTeachTime() == null ? other.getPublicCourseTeachTime() == null : this.getPublicCourseTeachTime().equals(other.getPublicCourseTeachTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPublicCourseTeachId() == null) ? 0 : getPublicCourseTeachId().hashCode());
        result = prime * result + ((getPublicCourseTeachNo() == null) ? 0 : getPublicCourseTeachNo().hashCode());
        result = prime * result + ((getPublicCourseTeachSpecialNo() == null) ? 0 : getPublicCourseTeachSpecialNo().hashCode());
        result = prime * result + ((getPublicCourseTeacherNo() == null) ? 0 : getPublicCourseTeacherNo().hashCode());
        result = prime * result + ((getPublicCourseTeachClassRoom() == null) ? 0 : getPublicCourseTeachClassRoom().hashCode());
        result = prime * result + ((getPublicCourseTeachDay() == null) ? 0 : getPublicCourseTeachDay().hashCode());
        result = prime * result + ((getPublicCourseTeachTime() == null) ? 0 : getPublicCourseTeachTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", publicCourseTeachId=").append(publicCourseTeachId);
        sb.append(", publicCourseTeachNo=").append(publicCourseTeachNo);
        sb.append(", publicCourseTeachSpecialNo=").append(publicCourseTeachSpecialNo);
        sb.append(", publicCourseTeacherNo=").append(publicCourseTeacherNo);
        sb.append(", publicCourseTeachClassRoom=").append(publicCourseTeachClassRoom);
        sb.append(", publicCourseTeachDay=").append(publicCourseTeachDay);
        sb.append(", publicCourseTeachTime=").append(publicCourseTeachTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}